<?php
/**
 * 直通车
 *
 * @author Administrator
 *
 */
namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Throughtrain extends Model
{
    //
    protected $table = 'throughtrain';

    protected $guarded = [''];

    public function user()
    {
        return $this->hasOne('App\Models\User', 'uid', 'uid');
    }

    /*
     * 获取用户信息
    */
    static function getUserInfo($uid)
    {
        $user = User::where('uid', $uid)->first();

        return $user;
    }

    protected function getDateFormat()
    {
        return date(time());
    }

}
